package nc.impl.gl;

import java.util.Map;

import nc.bs.gl.offset.ace.bp.CreateHistoryBP;
import nc.bs.gl.offset.ace.bp.DeleteDataBP;
import nc.bs.gl.offset.ace.bp.GenVoucherBP;
import nc.bs.gl.offset.ace.bp.QueryHeadBP;
import nc.bs.gl.offset.ace.bp.VoucherDetailBP;
import nc.impl.pub.ace.AceOffsetPubServiceImpl;
import nc.itf.gl.IOffsetMaintain;
import nc.ui.querytemplate.querytree.IQueryScheme;
import nc.vo.gl.offset.AggOffsetVO;
import nc.vo.gl.offset.OffsetBVO;
import nc.vo.gl.offset.OffsetVO;
import nc.vo.pub.BusinessException;

public class OffsetMaintainImpl extends AceOffsetPubServiceImpl
		implements IOffsetMaintain {

	@Override
	public void delete(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		super.pubdeleteBills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] insert(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubinsertBills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] update(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubupdateBills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] query(IQueryScheme queryScheme)
			throws BusinessException {
		return super.pubquerybills(queryScheme);
	}

	@Override
	public AggOffsetVO[] save(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubsendapprovebills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] unsave(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubunsendapprovebills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] approve(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubapprovebills(clientFullVOs, originBills);
	}

	@Override
	public AggOffsetVO[] unapprove(AggOffsetVO[] clientFullVOs,
			AggOffsetVO[] originBills) throws BusinessException {
		return super.pubunapprovebills(clientFullVOs, originBills);
	}

	@Override
	public Map<String, OffsetBVO[]> queryVoucherDetail(OffsetVO queryvo)
			throws BusinessException {
		return new VoucherDetailBP().exec(queryvo);
	}

	@Override
	public Map<String, OffsetBVO[]> createVoucher_Auto(Map<String, Object> querymap)
			throws BusinessException {
		return new GenVoucherBP().exec_Atuo(querymap);
	}
	
	@Override
	public Map<String, OffsetBVO[]> createVoucher_Hand(
			Map<String, Object> querymap) throws BusinessException {
		return new GenVoucherBP().exec_Hand(querymap);
	}

	@Override
	public OffsetVO[] queryHead(IQueryScheme queryScheme)
			throws BusinessException {
		return new QueryHeadBP().exec(queryScheme);
	}

	@Override
	public void createHistory(IQueryScheme queryScheme)
			throws BusinessException {
		new CreateHistoryBP().exec(queryScheme);
	}

	@Override
	public void deleteData(String[] billids) throws BusinessException {
		new DeleteDataBP().exec(billids);
	}

}
